package com.zhuangyuan.cloud.core.filters;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by 10191042 on 2019-09-24.
 */
@Configuration
public class FilterConfig {
    @Bean
    public FilterRegistrationBean  filterRegister(){
        FilterRegistrationBean register = new FilterRegistrationBean();
        register.setFilter(new ClientDeviceRequestFilter());
        register.addUrlPatterns("/*");
        register.setName(ClientDeviceRequestFilter.class.getSimpleName());
        register.setOrder(1);


        return register;
    }
}
